document.addEventListener('plusready', function() {
	$(".getGoodsLink").unbind();
	let _t = plus.webview.currentWebview();
	_t.overrideUrlLoading({
		mode: 'reject'
	}, function(e) {
		for (var item in _create) {
			if (e.url == _create[item]) {
				plus.webview.show(_create[item], "fade-in")
				for (var item2 in _refresh) {
					if (e.url == _refresh[item2]) {
						plus.webview.getWebviewById(e.url).reload()
						return false
					}
				}

				return false
			}
		}
		let reg = /.*taobao\.com.*/;
		if(reg.test(e.url)){
		console.log('-------' + e.url)
			console.log('http://localhost:13131/_www/linksdk.html')
			var w = plus.webview.create('http://localhost:13131/_www/linksdk.html', 'http://localhost:13131/_www/linksdk.html', {
				top: plus.navigator.getStatusbarHeight(),
				bottom: '0px',
				render: 'always'
			});
			w.evalJS('window.skipUrl="'+e.url+'";')
			//w.show()
			return false
		}
		
		console.log('-------' + e.url)
		var w = plus.webview.create(e.url, e.url, {
			top: plus.navigator.getStatusbarHeight(),
			bottom: '0px',
			render: 'always'
		});
		plus.nativeUI.showWaiting('', {
			background: 'rgba(0,0,0,0)',
			loading: {
				height: '60px',
				width: '60px',
				icon: '/img/waiting.png',
				interval: "100ms"
			}
		});
		w.appendJsFile('_www/data.js');
		w.appendJsFile('_www/js/index.js');
		w.setCssFile('_www/css/index.css');
		w.setBlockNetworkImage(true);
	});

});
